#ifndef _WEBSOCKET_PACKET_PARSING_H
#define _WEBSOCKET_PACKET_PARSING_H

#include <stdint.h>
#include <windows.h>
#include "Clib.h"
#include <stdio.h>

#define		TRUE						(1)
#define		FALSE						(0)
#define		WEBSOCKET_FIN_RSV			"fin_rsv"
#define		WEBSOCKET_OPCODE			"opcode"
#define		WEBSOCKET_MASK				"mask"
#define		WEBSOCKET_PAYLOAD_LEN		"payload_len"
#define		WEBSOCKET_MASK_KEY			"mask_key"
#define		WEBSOCKET_EXTENDED_PAYLEN	"extened_paylen"
#define		WEB_DATA					"data"

uint32_t get_websocket_packet_head(uint8_t *packet, uint8_t *keyword);
BOOL get_websocket_packet_data(uint8_t *packet, uint8_t *buf);
BOOL check_websocket_packet_rece_finish(uint8_t *packet, uint32_t len);

#endif
